home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…stman Always Clicks Twice / ADC Developer CD (1993-01) (''The Postman Always Clicks Twice'')_iso / Dev.CD 199301.iso / Development Platforms / CSMP Digests / csmp-v1-042.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  42.0 KB  |  1,112 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Tue, 07 Apr 92       Volume 1 : Issue 42
  2.  
  3. Today's Topics:
  4.  
  5.     Offscreen drawing
  6.     Scrolling Windows in ThinkPascal
  7.     Resorcerer vs. ResEdit
  8.     How to Make Scrolling Lists in Dialogs
  9.     Trouble with BitSET in THINK Pascal 4.0
  10.     X-10 Homewire interface questions
  11.     Shutdown Finder Event...
  12.     Subclassing CPanorama - How to get scrollbars?
  13.  
  14.  
  15. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  16.  
  17. These digests are available (by using FTP, account anonymous, your email
  18. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  19. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  20. Questions list.
  21.  
  22. These digests are also available via email.  Just send a note saying that you
  23. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  24. automatically receive each new digest as it is created.
  25.  
  26. The articles in these digests are taken directly from comp.sys.mac.programmer.
  27. They are not edited; all articles included in this digest are in their original
  28. posted form.  The only articles that are -not- included in these digests are
  29. those which didn't receive any replies (except those that give information
  30. rather than ask a question).  All replies to each article are concatenated
  31. onto the original article in the order in which they were received.  Article
  32. threads are not added to the digests until the last article added to the
  33. thread is at least one month old (this is to ensure that the thread is dead
  34. before adding it to the digests).
  35.  
  36. Send administrative mail to mkelly@cs.uoregon.edu.
  37.  
  38. -------------------------------------------------------
  39.  
  40. From: palais@binah.cc.brandeis.edu
  41. Subject: Offscreen drawing
  42. Date: 19 Feb 92 14:20:33 GMT
  43. Organization: Brandeis University
  44.  
  45.  
  46.   
  47.   I am updating an old (Think Pascal 1.0) graphics program. 
  48. Aside from converting it from a procedural to an OOP based 
  49. design (I'm using AppMaker with the TCL) the main real changes
  50. are that I'll be using color and I'll be doing my drawing into 
  51. an offscreen  pixmap rather than directly to the graphics window. 
  52. After learning about GWorlds it seemed that was clearly the way to 
  53. go in order to create and maintain the offscreen pixmap. But then 
  54. suddenly I realized that there was an apparently much simpler 
  55. method. Since nobody seems to mention it I suppose it must have some
  56. flaw, and I wonder if anyone here can point it out to me. 
  57.     The idea, quite simply, is to create a clone of my graphics 
  58. window, make it (and keep it) hidden, and use ITS pixmap as my 
  59. offscreen drawing canvas from which I do CopyBits to my graphics 
  60. window when I need to update it. 
  61.  
  62.  
  63.  
  64. - -------------------------
  65.  
  66. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  67. Subject:  Offscreen drawing
  68. Date: 20 Feb 92 09:38:22 GMT
  69. Organization: Royal Institute of Technology, Stockholm, Sweden
  70.  
  71. .cs.brandeis.edu> palais@binah.cc.brandeis.edu writes:
  72.  
  73.        The idea, quite simply, is to create a clone of my graphics 
  74.    window, make it (and keep it) hidden, and use ITS pixmap as my 
  75.    offscreen drawing canvas from which I do CopyBits to my graphics 
  76.    window when I need to update it. 
  77.  
  78. Windows don't have their own PixMaps; they just share the screen's
  79. pixMap, with clipping. You "hide" a window by setting its clipping
  80. to "clip all."
  81.  
  82. --
  83. This Signature is distributed under the conditions of the Signature License,
  84. available at a fee from   h+@nada.kth.se  (Jon W{tte)  Reading the Signature
  85. implies that you accept to be bound by the terms in said License. Should you
  86. not agree on any of these terms, you must return the Signature unread to me.
  87.  
  88.  
  89.  
  90. - -------------------------
  91.  
  92. From: bakker@fwi.uva.nl (Harry Bakker (I87))
  93. Date: 5 Mar 92 14:44:24 GMT
  94. Organization: FWI, University of Amsterdam
  95.  
  96. Hello net-trekkers,
  97.  
  98. I'm using a Mac LC, 4 MB internal and 40 MB external memory, and System 7.0
  99. installed.
  100. Recently I tried to create an offscreen grafPort using the NewGWorld call and
  101. flag noNewDevice set. I just needed the grafPort and not a completely new
  102. device, since I'm working with one screen anyway (I know, I know, this is not
  103. according to Apple guidelines but is a lot simpler). After creation, I drew
  104. a picture on it, en from there CopyBits it to an onscreen window. What I got
  105. on the screen didn't look remotely at the picture I hoped I would see. Now
  106. the problem with offscreen windows is... that you can't see what's on them.
  107.  
  108. What I would like is some advice of somebody, which explains how I can create
  109. an offscreen grafPort, draw a picture on it (extracted from the resource) and
  110. from there CopyBits it to an onscreen window. Preferrably in full color.
  111.  
  112. Could sombody give me advice? I will be looking for replies on the Net.
  113.  
  114. Thanks,
  115.  
  116. H.G.Bakker,
  117. Bommerscroft 13
  118. 1902 BG  Castricum
  119. The Netherlands
  120.  
  121. ---------------------------
  122.  
  123. From: costello@jupiter.cs.clemson.edu (E Gasparini)
  124. Subject: Scrolling Windows in ThinkPascal
  125. Organization: Clemson University Computer Science Dept.
  126. Date: Sun, 23 Feb 1992 21:06:41 GMT
  127.  
  128. Hi,
  129. thanks everybody who answered my last post (a zillion years ago)
  130.  
  131. My new questions are:
  132. 1. Is there a painless way of implementing scrolling windows in ThinkPascal?
  133.    i.e. without using the procedures provided by the language, but rather by
  134.    linking some module (TC maybe?), and avoiding code writing?
  135.  
  136. 2. How can the contents of a window (incluing the hidden parts) be printed
  137.    on a regular printer (image/laser writer)? From ThinkPascal again.
  138.  
  139. Thanks.
  140. Please post or email your answers.
  141. =========================================================================
  142. Elvis Gasprini
  143. costello@cs.clemson.edu
  144.  
  145.  
  146.  
  147. - -------------------------
  148.  
  149. From: jpugh@apple.com (Jon Pugh)
  150. Date: 3 Mar 92 22:27:08 GMT
  151. Organization: Apple Co.
  152.  
  153. In article <1992Feb23.210641.18107@hubcap.clemson.edu>, costello@jupiter.cs.clemson.edu (E Gasparini) writes:
  154. >  
  155. > My new questions are:
  156. > 1. Is there a painless way of implementing scrolling windows in ThinkPascal?
  157. >    i.e. without using the procedures provided by the language, but rather by
  158. >    linking some module (TC maybe?), and avoiding code writing?
  159. > 2. How can the contents of a window (incluing the hidden parts) be printed
  160. >    on a regular printer (image/laser writer)? From ThinkPascal again.
  161.  
  162. Use the THINK Class Library.  It does both of these things for you.  Painless.
  163.  
  164. Jon
  165.  
  166. ---------------------------
  167.  
  168. From: es1o+@andrew.cmu.edu (Eric Mitchell Snider)
  169. Subject: Resorcerer vs. ResEdit
  170. Date: 24 Feb 92 18:04:04 GMT
  171. Organization: Senior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
  172.  
  173. I've seen ads for Resorcerer (a resource editor as far as I know...) and
  174. I'm wondering how it compares to ResEdit. The retail price I saw was
  175. $256 so I'd like to know if it's worth it and if there's an educational
  176. discount or not. What kinds of differences are there? ResEdit does
  177. pretty much everything I need to, although it would be nice if it had a
  178. -good- balloon help editor.
  179.  
  180. -Eric Snider
  181. es1o@andrew.cmu.edu
  182.  
  183.  
  184.  
  185. - -------------------------
  186.  
  187. From: greeny@top.cis.syr.edu (Jonathan Greenfield)
  188. Subject:  Resorcerer vs. ResEdit
  189. Date: 24 Feb 92 22:14:42 GMT
  190. Organization: CIS Dept., Syracuse University
  191.  
  192. In article <kdeHCIe00VoxEJOEMT@andrew.cmu.edu> es1o+@andrew.cmu.edu (Eric Mitchell Snider) writes:
  193. >I've seen ads for Resorcerer (a resource editor as far as I know...) and
  194. >I'm wondering how it compares to ResEdit. The retail price I saw was
  195. >$256 so I'd like to know if it's worth it and if there's an educational
  196. >discount or not. What kinds of differences are there? ResEdit does
  197. >pretty much everything I need to, although it would be nice if it had a
  198. >-good- balloon help editor.
  199.  
  200. Short of reading my mind, I can't imagine what it might do to make it
  201. worth some $200 (or even $100) to use it rather than ResEdit.
  202.  
  203. Just my opinion...
  204. --
  205. J. S. Greenfield                                         greeny@top.cis.syr.edu
  206. (I like to put 'greeny' here, 
  207. but my d*mn system wants a 
  208. *real* name!)                        "What's the difference between an orange?"
  209.  
  210.  
  211.  
  212. - -------------------------
  213.  
  214. From: Pete.Gontier@p811.f70.n109.z1.fidonet.org (Pete Gontier)
  215. Subject: Resorcerer vs. ResEdit
  216. Date: 29 Feb 92 16:49:25 GMT
  217.  
  218.  
  219.  JG> From: greeny@top.cis.syr.edu (Jonathan Greenfield)
  220.  
  221.  JG> In article <kdeHCIe00VoxEJOEMT@andrew.cmu.edu> es1o+@andrew.cmu.edu (Eric
  222.  JG> Mitchell Snider) writes:
  223.  JG> >I've seen ads for Resorcerer (a resource editor as far as I know...) and
  224.  JG> >I'm wondering how it compares to ResEdit. The retail price I saw was
  225.  JG> >$256 so I'd like to know if it's worth it and if there's an educational
  226.  JG> >discount or not. What kinds of differences are there? ResEdit does
  227.  JG> >pretty much everything I need to, although it would be nice if it had a
  228.  JG> >-good- balloon help editor.
  229.  
  230. Resorcerer has a TMPL resource which handles balloon help. If you understand
  231. the variable-length and union-like nature of a balloon help resource, this
  232. should tell you a lot about how far superior to ResEdit Resorcerer is. (Hell,
  233. Resorcerer's balloon help editor is *usable*, which is more than I can say
  234. for BalloonWriter, which is a dedicated app.)
  235.  
  236.  JG> Short of reading my mind, I can't imagine what it might do to make it
  237.  JG> worth some $200 (or even $100) to use it rather than ResEdit.
  238.  
  239. There are quite literally dozens of reasons why you should take a look at
  240. Resorcerer. $200 is nothing, if you're actually working in the industry.
  241. There are demos posted in many places, possibly at sumex. But certainly
  242. at all the commercial BBS systems and some of the free locals.
  243.  
  244. Rather than dump a list of features here, I'll merely point out that a
  245. description ought to be appearing in the FAQ for this group some time
  246. soon.
  247.  
  248.  
  249.  
  250. - -------------------------
  251.  
  252. From: leonardr@ccs.itd.umich.edu
  253. Date: 28 Feb 92 18:07:30 GMT
  254. Organization: Campus Computing Sites, University of Michigan-Ann Arbor
  255.  
  256. In article <1992Feb24.171442.2440@newstand.syr.edu> greeny@top.cis.syr.edu (Jonathan Greenfield) writes:
  257. >In article <kdeHCIe00VoxEJOEMT@andrew.cmu.edu> es1o+@andrew.cmu.edu (Eric Mitchell Snider) writes:
  258. >>I've seen ads for Resorcerer (a resource editor as far as I know...) and
  259. >>I'm wondering how it compares to ResEdit. The retail price I saw was
  260. >>$256 so I'd like to know if it's worth it and if there's an educational
  261. >>discount or not. What kinds of differences are there? ResEdit does
  262. >>pretty much everything I need to, although it would be nice if it had a
  263. >>-good- balloon help editor.
  264. >
  265. >Short of reading my mind, I can't imagine what it might do to make it
  266. >worth some $200 (or even $100) to use it rather than ResEdit.
  267. >
  268.     If you just edit resources as a hobby, then I would agree that there
  269. is little reason to purcharse Resorcerer - however for those of us who spend
  270. our lives (it feels that way sometimes) editing resource it is WELL WORTH the
  271. $$.
  272.  
  273.     I've been using Resorcerer since it was first available as "beta-ware"
  274. almost 2 years ago (has it really been that long??) and some of the features
  275. that I can't live without including:
  276.  
  277.     Search & Replace: I frequently forget which resource has the 
  278. data that I need (especially true of dialogs & STR#'s), and a quick search
  279. will turn up what I need.
  280.     Dialog Editor: Most of the features of the ResEdit 2.x one came 
  281. from their looking at Resorcerer, but Resorcerer goes even further with 
  282. such additions as "Try Out" and "Generate Code" including handling of popUps
  283. and lists in both modal & modeless form!  Also, this editor handles nrct's
  284. for you cdev writers.
  285.     Printing: You can print ANY resource (dialogs come out very nicely)
  286. to the printer or to a text file  (useful for things liek string lists).
  287.     Rez Decompiler: Every resource can be "copied" to the clipboard as 
  288. "Rez" source.  I love this as I can edito my resources graphically in 
  289. Resorcerer and then just Copy - switch to MPW -a nd paste into my .r file!
  290.     TMPL editor: Makes creating you own TMPL's MUCH easier than ReEdit
  291. as well as extending the TMPL structures so that you can do some pretty
  292. cool TMPL's including "cases".
  293.  
  294.     And there is a LOT more that I didn't mention.  The only thing
  295. that I still use ResEdit for is "bitmap" resources (icons, sicns, etc.) since
  296. ResEdit does have a better set of tools for those items.
  297.  
  298.  
  299. - -- 
  300. - -----------------------------------------------------------------------
  301. Leonard Rosenthol          Internet: leonardr@ccs.itd.umich.edu
  302. Director of Advanced Technology   AppleLink: MACgician
  303. Aladdin Systems, inc.          GEnie:     MACgician
  304.  
  305. ---------------------------
  306.  
  307. From: leue@galen.crd.ge.com (Bill Leue)
  308. Subject: How to Make Scrolling Lists in Dialogs
  309. Date: 24 Feb 92 18:43:18 GMT
  310. Organization: General Electric Research & Development
  311.  
  312. I'm sorry if this subject has been rehashed 10**6 times already.  I DID look
  313. through the programmer's FAQ, TechNotes, and IM before asking, but couldn't
  314. find anything.
  315.  
  316. I'd like to know if anyone has come up with a "clean" way of implementing
  317. scrolling lists in a Dialog, particularly a non-modal Dialog.  The built-in
  318. Dialog items that ResEdit knows about for building DITL's don't include
  319. scrolling lists of any kind.  However, things like SFGetFile() use them, so
  320. obviously they're possible.
  321.  
  322. In fact, my real requirements are a bit harder, since I want a) a horizontally
  323. scrolling list, and b) graphics (not text or mere icons) as list elements.
  324. However, if I could see an example of ANY kind of scrolling list and see how
  325. the controls interact with the Dialog Manager, I could probably (?) figure 
  326. out the rest.
  327.  
  328. Thanks!
  329. -Bill Leue
  330. leue@crd.ge.com
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. - -------------------------
  339.  
  340. From: keith@Apple.COM (Keith Rollin)
  341. Subject:  How to Make Scrolling Lists in Dialogs
  342. Date: 25 Feb 92 04:16:22 GMT
  343. Organization: Apple Computer Inc., Cupertino, CA
  344.  
  345. In article <27643@crdgw1.crd.ge.com> leue@galen.crd.ge.com writes:
  346. >I'm sorry if this subject has been rehashed 10**6 times already.  I DID look
  347. >through the programmer's FAQ, TechNotes, and IM before asking, but couldn't
  348. >find anything.
  349.  
  350. Ahh...but you didn't look at the DTS Sample Code!
  351.  
  352. >I'd like to know if anyone has come up with a "clean" way of implementing
  353. >scrolling lists in a Dialog, particularly a non-modal Dialog.  The built-in
  354. >Dialog items that ResEdit knows about for building DITL's don't include
  355. >scrolling lists of any kind.  However, things like SFGetFile() use them, so
  356. >obviously they're possible.
  357.  
  358. DTS Sample Code #21 shows how to do this for modal dialogs. The
  359. technique for putting lists into modeless dialogs is simple to figure
  360. out from that.  You can ftp the sample from ftp.apple.com. It's in the
  361. folder dts/mac/sc.
  362.  
  363. >In fact, my real requirements are a bit harder, since I want a) a horizontally
  364. >scrolling list, and b) graphics (not text or mere icons) as list elements.
  365. >However, if I could see an example of ANY kind of scrolling list and see how
  366. >the controls interact with the Dialog Manager, I could probably (?) figure 
  367. >out the rest.
  368.  
  369. Scrolling is simple: it's supported by the List Manager when you call
  370. LClick.  For instance, after you detect a mouse down even, execute
  371. something like the following:
  372.  
  373.     switch (event->what) {
  374.         case mouseDown:
  375.             localMouse = event->where;
  376.             GlobalToLocal(&localMouse);
  377.             bounds = GetItemRect(dlg, kPermListUser);
  378.             if (PtInRect(localMouse, &bounds)) {
  379.                 LClick(localMouse, event->modifiers, myList);
  380.             }
  381.             break;
  382.  
  383. (GetItemRect is a small utility function that calls GetDItem and
  384. returns the bounding rectangle. kPermListUser is the item number
  385. of the user item that is used to display the list.)
  386.  
  387. Showing graphics in your list requires that you write your own LDEF,
  388. which is also very simple. Almost all you have to do is write the
  389. routine that draws a cell, given its cell number and location.
  390.  
  391. -- 
  392. - ----------------------------------------------------------------------------
  393. Keith Rollin           ---            <Taligent .signature under construction>
  394. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  395.  
  396.  
  397.  
  398. - -------------------------
  399.  
  400. From: Carl.Constantine@BCSystems.GOV.BC.CA
  401. Subject:  How to Make Scrolling Lists in Dialogs
  402. Date: 26 Feb 92 21:51:03 GMT
  403. Organization: BC Systems Corporation
  404.  
  405. In article <27643@crdgw1.crd.ge.com>, leue@galen.crd.ge.com (Bill Leue) writes:
  406. > I'm sorry if this subject has been rehashed 10**6 times already.  I DID look
  407. > through the programmer's FAQ, TechNotes, and IM before asking, but couldn't
  408. > find anything.
  409. > I'd like to know if anyone has come up with a "clean" way of implementing
  410. > scrolling lists in a Dialog, particularly a non-modal Dialog.  The built-in
  411. > Dialog items that ResEdit knows about for building DITL's don't include
  412. > scrolling lists of any kind.  However, things like SFGetFile() use them, so
  413. > obviously they're possible.
  414.  
  415. Yep, they are.  See below
  416. > In fact, my real requirements are a bit harder, since I want a) a horizontally
  417. > scrolling list, and b) graphics (not text or mere icons) as list elements.
  418. > However, if I could see an example of ANY kind of scrolling list and see how
  419. > the controls interact with the Dialog Manager, I could probably (?) figure 
  420. > out the rest.
  421.  
  422. I implemented a scrolling list in a modless dialog for my on-line help unit. 
  423. Actually, they're not to hard (I admittedly had some problems however,
  424. especially with a mouseUp which I still haven't got to work yet).  In your DITL
  425. resource, at a user-item where your list should go.  In your source code where
  426. you set up the list, check for a mouseDown in your userItem (whatever ItemHit
  427. returns).  From here, you can use the List Manager's routines to track the
  428. mouse in the List(userItem).  Like I said.  One thing I haven't been able to
  429. get to work is say you click on one item, holding the mouse button down, scroll
  430. (the List Manager takes care of this for you) to another item and let the mouse
  431. button up (mouseUp event).  Technically the item the the mouse came up on
  432. should appear in my help window, but it doesn't.  The item that the mouse was
  433. orignally clicked on does.  I'm calling all of the mouse tracking routines and
  434. haven't been able to get this to work. (LClick, etc) any one else out there
  435. with suggestions??
  436.  
  437. I don't mean to diapoint you, but I hope that this gives you good start at any
  438. rate.
  439.  
  440. -- 
  441. Carl.Constantine@BCSystems.gov.bc.ca
  442. Victoria, British Columbia, Canada
  443.  
  444.  
  445.  
  446. - -------------------------
  447.  
  448. From: ktyra@saphire (Kristopher L. Tyra)
  449. Subject:  How to Make Scrolling Lists in Dialogs
  450. Date: 29 Feb 92 03:43:48 GMT
  451. Organization: The Saphire Group
  452.  
  453. >(GetItemRect is a small utility function that calls GetDItem and
  454. >returns the bounding rectangle. kPermListUser is the item number
  455. >of the user item that is used to display the list.)
  456. >
  457. >Showing graphics in your list requires that you write your own LDEF,
  458. >which is also very simple. Almost all you have to do is write the
  459. >routine that draws a cell, given its cell number and location.
  460. >
  461.  
  462. OH THANK GOD ITS EASY FOR SOMEONE.  I'm having a terrible time with
  463. the LDEFs.  First thing - I'm using a A/UX hybird g++ this all works so
  464. I don't need help there.  What I don't understand is how do you get code
  465. in the resource fork!  Or better yet AddResource() states that you can 
  466. make a resource.  So I did!  NOT!  ResError returned -111 some problem
  467. with zones. This is what I'm trying to do.
  468.  
  469.  
  470.     extern void    pascal_list_def();
  471.  
  472.     myproc_handle = NewEmptyHandle();
  473.     *myproc_handle = pascal_list_def;
  474.     AddResource(myproc_handle, 'LDEF', 128);
  475.  
  476.     /*  Failure because AddResource didn't work.            */
  477.     /*  I suspect its because I have to allocate the       */
  478.     /*  space for the routine.  ITS ALREADY THERE WHO CARES!  */
  479.  
  480.  
  481. If I don't do it this way how do I get the code into a resource file.  I
  482. have a sneaky feeling that compiling a .o and then including won't work.
  483.  
  484.  
  485. HELP HELP HELP!
  486.  
  487.  
  488.  
  489.                 ________________________________
  490.                 Kristopher L. Tyra
  491.                 Consultant - A/UX, OSF, AIX/ESA
  492.                 (919) 481-9052
  493.                 wolves!saphire!ktyra@cs.duke.edu
  494.                 ktyra%saphire%wolves@cs.duke.edu
  495.  
  496.  
  497.  
  498. - -------------------------
  499.  
  500. From: dougm@descartes.cns.caltech.edu (Doug McNaught)
  501. Subject:  How to Make Scrolling Lists in Dialogs
  502. Date: 1 Mar 92 07:53:07 GMT
  503. Organization: California Institute of Technology
  504.  
  505. In article <1992Feb29.034348.4238@saphire> ktyra@saphire (Kristopher L. Tyra) writes:
  506. >>  [deleted]
  507. >>Showing graphics in your list requires that you write your own LDEF,
  508. >>which is also very simple. Almost all you have to do is write the
  509. >>routine that draws a cell, given its cell number and location.
  510. >>
  511. >
  512. >OH THANK GOD ITS EASY FOR SOMEONE.  I'm having a terrible time with
  513. >the LDEFs.  First thing - I'm using a A/UX hybird g++ this all works so
  514. >I don't need help there.  What I don't understand is how do you get code
  515. >in the resource fork!  Or better yet AddResource() states that you can 
  516. >make a resource.  So I did!  NOT!  ResError returned -111 some problem
  517. >with zones. This is what I'm trying to do.
  518. >
  519. >
  520. >    extern void    pascal_list_def();
  521. >
  522. >    myproc_handle = NewEmptyHandle();
  523. >    *myproc_handle = pascal_list_def;
  524.         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  525.   This, in the immortal words of MacTutor, is a "dangerous evil mutant method"
  526. of creating a code resource. Aiming the master pointer of an existing resource
  527. at a routine in your code (which is part of a CODE resource itself) is going to
  528. confuse the hell out of the Memory Manager. If whoever ported your g++ did a
  529. decent job, there should be some kind of switch to tell it to compile a single
  530. function as a code resource. If not, I *suppose* you could hack something up
  531. using BlockMove() to copy your routine's code into a handle, or use the tried-
  532. and-true 'six-byte resource' technique, which under A/UX requires that you
  533. flush the processor's caches. The 'six-byte resource' is an LDEF resource which
  534. contains an absolute JMP instruction in the first two bytes and the address of
  535. your procedure in the last four. I've never done it under A/UX so am a bit
  536. foggy on when and how the cache needs to be flushed--maybe one of the Quadra 
  537. types out there could help out?
  538.  
  539. >    AddResource(myproc_handle, 'LDEF', 128);
  540. >
  541. >    /*  Failure because AddResource didn't work.            */
  542. >    /*  I suspect its because I have to allocate the       */
  543. >    /*  space for the routine.  ITS ALREADY THERE WHO CARES!  */
  544. >
  545. >
  546. >If I don't do it this way how do I get the code into a resource file.  I
  547. >have a sneaky feeling that compiling a .o and then including won't work.
  548.  
  549.   Probably not. Sorry I can't help you on this bit.
  550. regards,
  551. doug
  552. -- 
  553. <><><><><><><><><><><><><><><>Go Skins!!<><><><><><><><><><><><><><><><>
  554. <> Doug McNaught                          dougm@descartes.caltech.edu <>
  555. <>  Help!!! I'm addicted to *Spaceward Ho!* Is there a support group? <>
  556. <><><><><><><><><><><><><><><>Go Skins!!<><><><><><><><><><><><><><><><>
  557.  
  558.  
  559.  
  560. - -------------------------
  561.  
  562. From: ktyra@saphire (Kristopher L. Tyra)
  563. Date: 4 Mar 92 23:28:59 GMT
  564. Organization: The Saphire Group
  565.  
  566. In article <1992Mar1.075307.6197@cco.caltech.edu> dougm@descartes.cns.caltech.edu (Doug McNaught) writes:
  567. >>
  568. >>    extern void    pascal_list_def();
  569. >>
  570. >>    myproc_handle = NewEmptyHandle();
  571. >>    *myproc_handle = pascal_list_def;
  572. >        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  573. >  This, in the immortal words of MacTutor, is a "dangerous evil mutant method"
  574. >of creating a code resource. Aiming the master pointer of an existing resource
  575. >at a routine in your code (which is part of a CODE resource itself) is going to
  576. >confuse the hell out of the Memory Manager. 
  577.  
  578. Boy and are you right.
  579.  
  580. > If whoever ported your g++ did a
  581. >decent job, there should be some kind of switch to tell it to compile a single
  582. >function as a code resource. If not, I *suppose* you could hack something up
  583. >using BlockMove() to copy your routine's code into a handle
  584.  
  585. Actually I did the port and 'decent' isn't one of the words I'd use. How
  586. about mutilated! (G++ 1.xx not 2.0 I haven't tried out Johns new stuff yet).
  587.  
  588. >, or use the tried-
  589. >and-true 'six-byte resource' technique, which under A/UX requires that you
  590. >flush the processor's caches. The 'six-byte resource' is an LDEF resource which
  591. >contains an absolute JMP instruction in the first two bytes and the address of
  592. >your procedure in the last four. I've never done it under A/UX so am a bit
  593. >foggy on when and how the cache needs to be flushed--maybe one of the Quadra 
  594. >types out there could help out?
  595.  
  596. This is what I eventually found out by looking at some code that tested
  597. the LDEF's.  I forget the author write off hand but he built a jmp 
  598. instruction  type resource and all is well.  However, I didn't flush the
  599. cache.  I haven't had any problems (Racer 030 33mhz with external cache).
  600. Could some one expand on this a bit?
  601.  
  602. Thanks to everyone for there help!
  603.  
  604.  
  605.  
  606.                 ________________________________
  607.                 Kristopher L. Tyra
  608.                 Consultant - A/UX, OSF, AIX/ESA
  609.                 (919) 481-9052
  610.                 wolves!saphire!ktyra@cs.duke.edu
  611.                 ktyra%saphire%wolves@cs.duke.edu
  612.  
  613. ---------------------------
  614.  
  615. From: felciano@medisg.stanford.edu (Ramon Felciano)
  616. Subject: Trouble with BitSET in THINK Pascal 4.0
  617. Organization: SUMMIT, Stanford U. Medical Media & Information Technologies
  618. Date: Tue, 25 Feb 92 18:13:45 GMT
  619.  
  620.  
  621. Hello!
  622.  
  623. I'm writing an MDEF and am struggling with the enabled flags of the menu resource. The problem seems to resolve around how to get and set bits. I've run into this before, specifically when checking the result returned from the Gestalt manager. Here's an simple example:
  624.  
  625.  
  626. PROGRAM Dummy;
  627.  
  628.     TYPE
  629.          Bits = PACKED ARRAY[0..31] OF boolean;
  630.  
  631.     VAR
  632.          MyFlags: longint;
  633.          Loop: integer;
  634.  
  635. BEGIN
  636.       MyFlags := 0;
  637.       FOR Loop := 0 TO 31 DO
  638.              BitSET(@MyFlags, Loop);
  639. END.
  640.  
  641. Ordinarily, I would assume that this would loop through 32 times, setting the bits of MyFlags from right (0) to left (31). If I set a checkpoint at the BitSET line, and typecast MyFlags to Bits (as defined above), I can use Lightsbug to view MyFlags as a series of booleans (the closest thing to a bit readout I could think of).
  642.  
  643. When I do so, I see weird things happening. The loop does set the bits of my flags, but starts at array position 7, then works down to 0, then jumps to around 14, working down to 8, then up to 21, etc.
  644.  
  645. Whaaaaaaaaa?
  646.  
  647. Any ideas on how this is solved?
  648.  
  649. And I right in interpreting the following code (see code comments):
  650.  
  651.           MyFlags := 0;            {MyFlags is 0}
  652.              BitSET(@MyFlags, 0);     {MyFlags is 1}
  653.  
  654.           MyFlags := 0;            {MyFlags is 0}
  655.              BitSET(@MyFlags, 1);     {MyFlags is 2}
  656.  
  657.           MyFlags := 0;            {MyFlags is 0}
  658.              BitSET(@MyFlags, 0);     {MyFlags is 1}
  659.              BitSET(@MyFlags, 1);     {MyFlags is 3}
  660.  
  661. Thank you in advance!
  662.  
  663. Ramon M. Felciano
  664. Associate Director, SUMMIT
  665. Stanford University Medical Media and Information Technologies
  666.  
  667. P.S. Please feel free to answer via e-mail in order to avoid net clutter.
  668.      (I'm at felciano@medisg.stanford.edu)
  669.  
  670.  
  671.  
  672. - -------------------------
  673.  
  674. From: REEKES@applelink.apple.com (Jim Reekes)
  675. Date: 3 Mar 92 22:48:21 GMT
  676. Organization: Apple Computer, Inc.
  677.  
  678. In article <1992Feb25.181345.20483@leland.Stanford.EDU>, felciano@medisg.stanford.edu (Ramon Felciano) writes:
  679.  
  680. > I'm writing an MDEF and am struggling with the enabled flags of the 
  681. > menu resource. The problem seems to resolve around how to get and 
  682. > set bits. I've run into this before, specifically when checking the 
  683. > result returned from the Gestalt manager.
  684.  
  685. > (example code calling BitSet...)
  686.  
  687. Here's some example code for setting, clearing, and testing bits in Pascal.
  688.  
  689. PROCEDURE TestBits(myFlags : LONGINT);
  690.  
  691. CONST
  692.     kFlagZero       = $1;
  693.     kFlagOne        = $2;
  694.     kFlagTwo        = $4;
  695.  
  696.     kFlagNotZero    = $FFFFFFFE;
  697.     kFlagNotOne     = $FFFFFFFD;
  698.     kFlagNotTwo     = $FFFFFFFB;
  699.  
  700. BEGIN
  701.     myFlags := BOr(myFlags, kFlagZero); {this sets bit zero}
  702.     myFlags := BOr(myFlags, kFlagOne);  {this sets bit one}
  703.     myFlags := BOr(myFlags, kFlagTwo);  {this sets bit two}
  704.  
  705.     {this sets bits zero, one, and two}
  706.     myFlags := BOr(myFlags, kFlagZero+kFlagOne+kFlagTwo);
  707.  
  708.     myFlags := BAnd(myFlags, kFlagNotZero); {this clears bit zero}
  709.     myFlags := BAnd(myFlags, kFlagNotOne);  {this clears bit one}
  710.     myFlags := BAnd(myFlags, kFlagNotTwo);  {this clears bit two}
  711.  
  712.     {this clears bits zero, one, and two}
  713.     myFlags := BAnd(myFlags, BNot(kFlagZero+kFlagOne+kFlagTwo));
  714.  
  715.     IF BAnd(myFlags, kFlagZero) <> 0 THEN   {this tests if bit zero is set}
  716.         ;
  717.     IF BAnd(myFlags, kFlagOne) <> 0 THEN    {this tests if bit one is set}
  718.         ;
  719.     IF BAnd(myFlags, kFlagTwo) <> 0 THEN    {this tests if bit two is set}
  720.         ;
  721.  
  722.     {this tests if bits zero, one, and two are set}
  723.     IF BAnd(myFlags, kFlagZero+kFlagOne+kFlagTwo) <> 0 THEN
  724.         ;
  725. END;
  726.  
  727. Here's the object code generated for the above MPW Pascal source.
  728.  
  729.           LINK       A6,#$0000
  730.           MOVE.L     D7,-(A7)
  731.           MOVE.L     $0008(A6),D7
  732.  
  733.           OR.L       #$00000001,D7    ;this sets bit zero
  734.           OR.L       #$00000002,D7    ;this sets bit one
  735.           OR.L       #$00000004,D7    ;this sets bit two
  736.  
  737.           MOVEQ      #$00,D0
  738.           MOVE.W     #$0007,D0
  739.           OR.L       D0,D7            ;this sets bits zero, one, and two
  740.  
  741.           AND.L      #$FFFFFFFE,D7    ;this clears bit zero
  742.           AND.L      #$FFFFFFFD,D7    ;this clears bit one
  743.           AND.L      #$FFFFFFFB,D7    ;this clears bit two
  744.  
  745.           MOVEQ      #$00,D0
  746.           MOVE.W     #$0007,D0
  747.           NOT.L      D0
  748.           AND.L      D0,D7            ;this clears bits zero, one, and two
  749.  
  750.           MOVE.L     D7,D0
  751.           AND.L      #$00000001,D0
  752.           TST.L      D0               ;this tests if bit zero is set
  753.           MOVE.L     D7,D0
  754.           AND.L      #$00000002,D0
  755.           TST.L      D0               ;this tests if bit one is set
  756.           MOVE.L     D7,D0
  757.           AND.L      #$00000004,D0
  758.           TST.L      D0               ;this tests if bit two is set
  759.  
  760.           MOVEQ      #$00,D0
  761.           MOVE.W     #$0007,D0
  762.           MOVE.L     D7,D1
  763.           AND.L      D0,D1
  764.           TST.L      D1               ;this tests if bits zero, one, and two are set
  765.  
  766.           MOVE.L     (A7)+,D7
  767.           UNLK       A6
  768.           MOVE.L     (A7)+,(A7)
  769.           RTS
  770.  
  771.  
  772. This is a features of the MPW Pascal compiler and it translates into a
  773. single assembly instruction as shown.  I'm certain that the LS Pascal
  774. compiler will support this too, since MacApp probably used it.  It's
  775. stupid to call a trap just to set a bit.  You do have to be careful when
  776. testing or clearing multiple bits since Pascal does not have a bitwise
  777. NOT operator.  In C and Assembly you can use ~kFlagOne instead of the
  778. special constant kFlagNotOne.  And since you cannot sum all of the
  779. kFlagNotxxx constants together to create the proper mask when testing
  780. for multiple bits, I used the BNot instruction to perform the twos
  781. compliment at runtime.  You could have other masks defined for special
  782. bit patterns. 
  783.  
  784.  
  785. - -------------------------------------------------------------------
  786. Jim Reekes, E.O.             |     Macintosh Toolbox Engineering
  787.                              |          Sound Manager Expert
  788. Apple Computer, Inc.         | All opinions expressed are mine, and
  789. 20525 Mariani Ave. MS: 81-EQ |  do not necessarily represent those
  790. Cupertino, CA 95014          |  of my employer, Apple Computer Inc.
  791.  
  792. ---------------------------
  793.  
  794. From: mstephens.520@postman.gsfc.nasa.gov (mark stephens)
  795. Subject: X-10 Homewire interface questions
  796. Date: 25 Feb 92 20:57:38 GMT
  797. Organization: nasa/gsfc
  798.  
  799. Hi folks,
  800.  
  801. I will soon have the Mac version of the x-10 interface kit.  X-10 is a 
  802. hardware/protocol which allows electrical appliances to be turned off and 
  803. on via signals sent in electrical wiring.  I'll mainly use it for controlling
  804. devices connected to aquarium and plant lights.  I plan to program the device
  805. via a Mac IIsi and, if possible, have a MacPlus control the devices on a 
  806. continuous bases.
  807.  
  808. Does anybody have any experience with this device?
  809.  
  810. Does anybody have a HyperCard or other interface?  I'm hoping it comes with one, 
  811. but I'm assuming it comes with a set of serial port commands and some 
  812. hoky, PC based interface.  Hope I'm wrong!
  813.  
  814. thanks,
  815. mark
  816.  
  817.  
  818.  
  819. - -------------------------
  820.  
  821. From: stevens@sigi.cs.colorado.edu (Curt Stevens)
  822. Subject:  X-10 Homewire interface questions
  823. Date: 27 Feb 92 20:58:54 GMT
  824. Organization: University of Colorado, Boulder
  825.  
  826. In article <1992Feb25.205738.2524@kong.gsfc.nasa.gov> mstephens.520@postman.gsfc.nasa.gov (mark stephens) writes:
  827. >Hi folks,
  828. >
  829. >I will soon have the Mac version of the x-10 interface kit.  X-10 is a 
  830. >hardware/protocol which allows electrical appliances to be turned off and 
  831. >on via signals sent in electrical wiring.  I'll mainly use it for controlling
  832. >devices connected to aquarium and plant lights.  I plan to program the device
  833. >via a Mac IIsi and, if possible, have a MacPlus control the devices on a 
  834. >continuous bases.
  835.  
  836. X-10's Mac interface includes an application and a box to download X-10
  837. instructions so that your Mac does NOT have to be on in order to have
  838. your programs running. This external box uses a serial connection and
  839. allows you to download instructions, turn your computer off, and continue
  840. to have your X-10 programs run. X-10 also supplies you with the protocol
  841. so that you can write your own applications or stacks to control your
  842. lights.
  843.  
  844. >
  845. >Does anybody have any experience with this device?
  846.  
  847. My entire household is wired to X-10 devices. My favorite thing about the
  848. system is that you can purchase IR-remotes to control everything. I can
  849. turn on/off/dim any light in my house from my seat in front of the TV.
  850. This comes in really handy when you go to sleep and forget to turn off
  851. some lights (there is an "all lights off" button on the remotes). Also, I
  852. live in the cold and I can use the remote to turn on my bathroom heater a
  853. few minutes before getting out of bed in the morning.  If you are getting
  854. the idea that I am lazy, you are absolutely correct :->. X-10 makes it
  855. all that much easier.
  856.  
  857. Another thing I do with it is set the "box" to run lights when I am away.
  858. You can write a program (by clicking on icons etc.) that will run you
  859. lights in a pattern similar to that which you would exhibit if you were
  860. really home. There is even a security feature that varies light commands
  861. by +/-20 minutes randomly so that your lights don't do exactly the same
  862. thing every night you are away.
  863.  
  864. There are also modules to control home thermostats (I don't have this
  865. one!), lamps (two-prong plugs), appliances (three-prong plugs),
  866. flourescent lamps, etc.
  867.  
  868.  
  869. >Does anybody have a HyperCard or other interface? Im hoping it comes with one, 
  870. >but I'm assuming it comes with a set of serial port commands and some 
  871. >hoky, PC based interface.  Hope I'm wrong!
  872.  
  873. The version for the Mac is iconic and reasonable. The PC version is hoky
  874. and disgusting.
  875.  
  876. ========================================================================
  877. |Curt Stevens   (303) 492-1218 | / |arpa:stevens@sigi.cs.colorado.edu  |
  878. |Univ. of Colorado, Boulder    |o o|uucp:ncar!sigi.cs.colordo.edu!{...}|
  879. |Computer Sci. Dept. ECOT 7-7  | | |-----------------------------------|
  880. |Campus Box 430                |\_/| I contradict myself? Very well, I |
  881. |Boulder, Colorado 80309  USA  |   | contradict myself. - Walt Whitman |
  882. ========================================================================
  883. -- 
  884.  
  885. ========
  886. | Curt |
  887. ========
  888.  
  889.  
  890.  
  891. - -------------------------
  892.  
  893. From: stevens@sigi.cs.colorado.edu (Curt Stevens)
  894. Subject:  X-10 Homewire interface questions
  895. Date: 29 Feb 92 19:04:13 GMT
  896. Organization: University of Colorado, Boulder
  897.  
  898. In article <1992Feb27.205854.6504@colorado.edu> stevens@sigi.cs.colorado.edu (Curt Stevens) writes:
  899.  
  900. >>My entire household is wired to X-10 devices.
  901. >
  902. >How much did this cost you? I don't want specifics, just approximate costs
  903. >of boxes. I'm interested in doing the _exact_ same thing, but I
  904. >was concerned I would have to leave my Mac turned on all night
  905. >(as if it's not already!).
  906. >
  907. >Glad to hear it works!
  908.  
  909. I certainly does! As for how much this costs; each lamp, appliance, and
  910. wall switch module costs about $12.00 at radio shack. 3-Way wall switches
  911. cost a bit more (these are for lights controlled by two wall switches
  912. instead of the standard single control). I have absolutely NO idea how much
  913. the serial computer interface costs (I purchased it many years ago). It
  914. utilizes an RS-232 connection and operates perfectly with my modem cable.
  915. You only need to connect the interface to your Mac when you are downloading
  916. programs from the X-10 software. Therefore, you can temporarily connect
  917. your modem cable to the X-10 box, download your programs (you must connect
  918. before launching the X-10 software), and reconnect the cable to your modem.
  919. You can then turn off your computer because the interface holds the
  920. program. The interface plugs into the wall (just like lamp and appliance
  921. modules) and contains a 9-volt battery for backup in case of power failure.
  922.  
  923. For more information you can contact:
  924.  
  925. X-10(USA) INC.
  926. 185A Legrand Ave.
  927. Northvale, NJ 07647
  928. (201) 784-9700
  929.  
  930.  
  931. and ask about:
  932.  
  933. X-10 Powerhouse RS-232 Computer Interface (specify Mac or IBM)
  934. (My model number for the Mac [remember my unit is very old] is Model CP290)
  935.  
  936. ========================================================================
  937. |Curt Stevens   (303) 492-1218 | / |arpa:stevens@sigi.cs.colorado.edu  |
  938. |Univ. of Colorado, Boulder    |o o|uucp:ncar!sigi.cs.colordo.edu!{...}|
  939. |Computer Sci. Dept. ECOT 7-7  | | |-----------------------------------|
  940. |Campus Box 430                |\_/| I contradict myself? Very well, I |
  941. |Boulder, Colorado 80309  USA  |   | contradict myself. - Walt Whitman |
  942. ========================================================================
  943.  
  944.  
  945.  
  946.  
  947. -- 
  948.  
  949. ========
  950. | Curt |
  951. ========
  952.  
  953.  
  954.  
  955. - -------------------------
  956.  
  957. From: jpugh@apple.com (Jon Pugh)
  958. Subject:  X-10 Homewire interface questions
  959. Date: 3 Mar 92 00:08:07 GMT
  960. Organization: Apple Co.
  961.  
  962. In article <1992Feb25.205738.2524@kong.gsfc.nasa.gov>, mstephens.520@postman.gsfc.nasa.gov (mark stephens) writes:
  963. > I will soon have the Mac version of the x-10 interface kit.  X-10 is a 
  964. > hardware/protocol which allows electrical appliances to be turned off and 
  965. > on via signals sent in electrical wiring.  I'll mainly use it for controlling
  966. > devices connected to aquarium and plant lights.  I plan to program the device
  967. > via a Mac IIsi and, if possible, have a MacPlus control the devices on a 
  968. > continuous bases.
  969. > Does anybody have any experience with this device?
  970. > Does anybody have a HyperCard or other interface?  I'm hoping it comes with one, 
  971. > but I'm assuming it comes with a set of serial port commands and some 
  972. > hoky, PC based interface.  Hope I'm wrong!
  973.  
  974. It comes with a hokey Macintosh interface.  Hardly better.  It crashes 
  975. regularly and has not been updated since 1987 or so.
  976.  
  977. Once you get it set up however, it runs like a champ.  I have been using it
  978. for years and like it.  I have played with a Hypercard interface but this is
  979. not the best choice since HC canUt deal with Nulls and the interface uses 
  980. them.  I have been thinking about writing an XCMD to do all the io but 
  981. havenUt had the time.  If I move I will probably do this since the software
  982. wonUt run on my Quadra any more and I will need to set it up for my new house.
  983. Until then I just leave it alone.
  984.  
  985. Jon
  986.  
  987.  
  988.  
  989. - -------------------------
  990.  
  991. From: mandel@vax.anes.tulane.edu (Jeff E Mandel)
  992. Date: 4 Mar 92 18:48:44 GMT
  993. Organization: Tulane University School of Medicine
  994.  
  995. In article <21007@goofy.Apple.COM> jpugh@apple.com (Jon Pugh) writes:
  996. >I have been thinking about writing an XCMD to do all the io but 
  997. >havenUt had the time.  If I move I will probably do this since the software
  998. >wonUt run on my Quadra any more and I will need to set it up for my new house.
  999. >Until then I just leave it alone.
  1000.  
  1001. I trust we can ultimately look forward to a set of X-10 AppleEvents?
  1002.  
  1003. Jeff E Mandel MD MS
  1004. Associate Professor of Anesthesiology
  1005. Tulane University School of Medicine
  1006. New Orleans, LA
  1007.  
  1008. mandel@vax.anes.tulane.edu
  1009.  
  1010. ---------------------------
  1011.  
  1012. From: danny@utkux1.utk.edu (Danny McCampbell)
  1013. Subject: Shutdown Finder Event...
  1014. Date: 26 Feb 92 20:26:40 GMT
  1015. Organization: University of Tennessee
  1016.  
  1017. Is there an easy way to send the Shutdown event to the Finder from
  1018. an application?  I have a modal dialog with two buttons.  If the
  1019. user clicks on one something happens, but if they click on the
  1020. other one I want the Mac to shutdown.  Please, any help would be
  1021. appreciated.  I am new to this stuff.
  1022.  
  1023. Danny 
  1024.  
  1025.  
  1026.  
  1027. - -------------------------
  1028.  
  1029. From: jpugh@apple.com (Jon Pugh)
  1030. Date: 3 Mar 92 22:48:40 GMT
  1031. Organization: Apple Co.
  1032.  
  1033. In article <1992Feb26.202640.25831@utkux1.utk.edu>, danny@utkux1.utk.edu (Danny McCampbell) writes:
  1034. > Is there an easy way to send the Shutdown event to the Finder from
  1035. > an application?  I have a modal dialog with two buttons.  If the
  1036. > user clicks on one something happens, but if they click on the
  1037. > other one I want the Mac to shutdown.  Please, any help would be
  1038. > appreciated.  I am new to this stuff.
  1039. > Danny 
  1040.  
  1041. For example code you can check out my FinderEvents XCMD which includes
  1042. Pascal source on ftp.apple.com in /pub/pugh/hyperstuff.
  1043.  
  1044. This is a really simple event.
  1045.  
  1046. Jon
  1047.  
  1048. ---------------------------
  1049.  
  1050. From: chait@cs.umass.edu
  1051. Subject: Subclassing CPanorama - How to get scrollbars?
  1052. Date: 26 Feb 92 22:07:51 GMT
  1053. Organization: COINS, UMass, Amherst
  1054.  
  1055. I'm hoping that there's a few people out there hot on TCL who can help me with
  1056. a project I'm working on (I've got lots of Qs about TCL, but need one answer
  1057. immediately).  I've got a subclass of CPanorama which basically displays
  1058. subpanes of Icons in rows and columns (36 pixels tall by 640 wide).  I have
  1059. it autoinitializing a ton of icon panes; in fact, they go off the bottom of
  1060. the window.  My problem is, I don't know how to set up the Panorama to
  1061. 1. turn on the scroll bars (and, I guess, turn them back off)
  1062. 2. have it scroll correctly when I click
  1063. 3. have it autoscroll when I'm dragging icons around the panorama.
  1064.  
  1065. If anyone can help me with this, I'd appreciate it.  Let's hear it for
  1066. Honors Thesis hell...
  1067.  
  1068. Dave Chait
  1069. Chief Architect
  1070. Future Generation Software
  1071.  
  1072.  
  1073.  
  1074. - -------------------------
  1075.  
  1076. From: jpugh@apple.com (Jon Pugh)
  1077. Date: 3 Mar 92 22:47:10 GMT
  1078. Organization: Apple Co.
  1079.  
  1080. In article <44017@dime.cs.umass.edu>, chait@cs.umass.edu writes:
  1081. > I'm hoping that there's a few people out there hot on TCL who can help me with
  1082. > a project I'm working on (I've got lots of Qs about TCL, but need one answer
  1083. > immediately).  I've got a subclass of CPanorama which basically displays
  1084. > subpanes of Icons in rows and columns (36 pixels tall by 640 wide).  I have
  1085. > it autoinitializing a ton of icon panes; in fact, they go off the bottom of
  1086. > the window.  My problem is, I don't know how to set up the Panorama to
  1087. > 1. turn on the scroll bars (and, I guess, turn them back off)
  1088. > 2. have it scroll correctly when I click
  1089. > 3. have it autoscroll when I'm dragging icons around the panorama.
  1090.  
  1091. Don't put this stuff in the Panaroma, put a ScrollPane there and put all
  1092. your Pane subclasses in it.
  1093.  
  1094. Jon
  1095.  
  1096. ---------------------------
  1097.  
  1098. End of C.S.M.P. Digest
  1099. **********************
  1100.